package com.scrat.sensorlist;

import android.hardware.Sensor;
import android.support.annotation.Nullable;
import android.util.Log;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

public class SensorAdapter extends BaseQuickAdapter<Sensor, BaseViewHolder> {

    public SensorAdapter(@Nullable List<Sensor> data) {
        super(R.layout.sensor_recycler_item, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, Sensor item) {

        helper.setText(R.id.tv_item_name, item.getName());
        helper.setText(R.id.tv_item_type, item.getType() + ":" + item.getStringType());

        Log.d(TAG, "" + item.getName() + ":" + item.getType());
    }


}
